3.1.4 \(\int (c+d x) \sin (a+b x) \, dx\) [4]

Optimal. Leaf size=28 \[ -\frac {(c+d x) \cos (a+b x)}{b}+\frac {d \sin (a+b x)}{b^2} \]

[Out]

-(d*x+c)*cos(b*x+a)/b+d*sin(b*x+a)/b^2

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3377, 2717} \begin {gather*} \frac {d \sin (a+b x)}{b^2}-\frac {(c+d x) \cos (a+b x)}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Sin[a + b*x],x]

[Out]

-(((c + d*x)*Cos[a + b*x])/b) + (d*Sin[a + b*x])/b^2

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rubi steps

\begin {align*} \int (c+d x) \sin (a+b x) \, dx &=-\frac {(c+d x) \cos (a+b x)}{b}+\frac {d \int \cos (a+b x) \, dx}{b}\\ &=-\frac {(c+d x) \cos (a+b x)}{b}+\frac {d \sin (a+b x)}{b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 27, normalized size = 0.96 \begin {gather*} \frac {-b (c+d x) \cos (a+b x)+d \sin (a+b x)}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Sin[a + b*x],x]

[Out]

(-(b*(c + d*x)*Cos[a + b*x]) + d*Sin[a + b*x])/b^2

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 52, normalized size = 1.86

method result size
risch \(-\frac {\left (d x +c \right ) \cos \left (b x +a \right )}{b}+\frac {d \sin \left (b x +a \right )}{b^{2}}\) \(29\)
derivativedivides \(\frac {\frac {d a \cos \left (b x +a \right )}{b}-c \cos \left (b x +a \right )+\frac {d \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b}}{b}\) \(52\)
default \(\frac {\frac {d a \cos \left (b x +a \right )}{b}-c \cos \left (b x +a \right )+\frac {d \left (\sin \left (b x +a \right )-\left (b x +a \right ) \cos \left (b x +a \right )\right )}{b}}{b}\) \(52\)
norman \(\frac {\frac {2 c \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {d x \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {2 d \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}{b^{2}}-\frac {d x}{b}}{1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )}\) \(74\)
meijerg \(\frac {2 d \sqrt {\pi }\, \cos \left (a \right ) \left (-\frac {x b \cos \left (b x \right )}{2 \sqrt {\pi }}+\frac {\sin \left (b x \right )}{2 \sqrt {\pi }}\right )}{b^{2}}+\frac {2 d \sqrt {\pi }\, \sin \left (a \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cos \left (b x \right )}{2 \sqrt {\pi }}+\frac {x b \sin \left (b x \right )}{2 \sqrt {\pi }}\right )}{b^{2}}+\frac {c \sqrt {\pi }\, \cos \left (a \right ) \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (b x \right )}{\sqrt {\pi }}\right )}{b}+\frac {c \sin \left (a \right ) \sin \left (b x \right )}{b}\) \(105\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*sin(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/b*(1/b*d*a*cos(b*x+a)-c*cos(b*x+a)+1/b*d*(sin(b*x+a)-(b*x+a)*cos(b*x+a)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 53, normalized size = 1.89 \begin {gather*} -\frac {c \cos \left (b x + a\right ) - \frac {a d \cos \left (b x + a\right )}{b} + \frac {{\left ({\left (b x + a\right )} \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right )} d}{b}}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sin(b*x+a),x, algorithm="maxima")

[Out]

-(c*cos(b*x + a) - a*d*cos(b*x + a)/b + ((b*x + a)*cos(b*x + a) - sin(b*x + a))*d/b)/b

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 30, normalized size = 1.07 \begin {gather*} -\frac {{\left (b d x + b c\right )} \cos \left (b x + a\right ) - d \sin \left (b x + a\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sin(b*x+a),x, algorithm="fricas")

[Out]

-((b*d*x + b*c)*cos(b*x + a) - d*sin(b*x + a))/b^2

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 46, normalized size = 1.64 \begin {gather*} \begin {cases} - \frac {c \cos {\left (a + b x \right )}}{b} - \frac {d x \cos {\left (a + b x \right )}}{b} + \frac {d \sin {\left (a + b x \right )}}{b^{2}} & \text {for}\: b \neq 0 \\\left (c x + \frac {d x^{2}}{2}\right ) \sin {\left (a \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sin(b*x+a),x)

[Out]

Piecewise((-c*cos(a + b*x)/b - d*x*cos(a + b*x)/b + d*sin(a + b*x)/b**2, Ne(b, 0)), ((c*x + d*x**2/2)*sin(a),
True))

________________________________________________________________________________________

Giac [A]
time = 2.88, size = 31, normalized size = 1.11 \begin {gather*} -\frac {{\left (b d x + b c\right )} \cos \left (b x + a\right )}{b^{2}} + \frac {d \sin \left (b x + a\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sin(b*x+a),x, algorithm="giac")

[Out]

-(b*d*x + b*c)*cos(b*x + a)/b^2 + d*sin(b*x + a)/b^2

________________________________________________________________________________________

Mupad [B]
time = 0.53, size = 35, normalized size = 1.25 \begin {gather*} \frac {d\,\sin \left (a+b\,x\right )}{b^2}-\frac {c\,\cos \left (a+b\,x\right )+d\,x\,\cos \left (a+b\,x\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)*(c + d*x),x)

[Out]

(d*sin(a + b*x))/b^2 - (c*cos(a + b*x) + d*x*cos(a + b*x))/b

________________________________________________________________________________________